import request from '@/utils/request'

// 查询接取订单列表
export function listCollectorOrder(query) {
  return request({
    url: '/order/collectorOrder/list',
    method: 'get',
    params: query
  })
}

// 查询接取订单详细
export function getCollectorOrder(orderId) {
  return request({
    url: '/order/collectorOrder/' + orderId,
    method: 'get'
  })
}

// 新增接取订单
export function addCollectorOrder(data) {
  return request({
    url: '/order/collectorOrder',
    method: 'post',
    data: data
  })
}

// 接取订单
export function updateCollectorOrder(data) {
  return request({
    url: '/order/collectorOrder',
    method: 'put',
    data: data
  })
}

// 完成订单
export function finishCollectorOrder(data) {
  return request({
    url: '/order/collectorOrder/finish' ,
    method: 'put',
    data: data
  })
}